


Calculates the radiative and total decay rate EFs for dipole emission from the Mie susceptibilities
The relevant formulae are given in Eqs. H.95, H.96, H.102, H.103.
The ESA approximation is used for large N between nNmax+1 and
nNmaxESA for MTot to avoid slow convergence problems
for absorbing particles when d is small (see Sec. H.5.1).
If sCoeffSum='coeffSum', then the terms in the series are returned
so that the actual convergence of the series can be checked.
Parameters:
- xp: column vector [L x 1]
wavelength-dependent xp=kM*(a+d)
- stGD: structure with two fields, Gamma and Delta
each a matrix [L x nNmax]
with suceptibilities Gamma_n and Delta_n
can be obtained from function GenSuscepGDAB
- a: scalar [1 x 1]
radius of sphere
- d: scalar [1 x 1]
distance of dipole to surface
- s: column vector [L x 1]
wavelength-dependent relative refractive index
s^2=epsilonIn/epsilonM (Eq. H. 46)
- nNmaxESA: optional integer [1x1]
maximum N for MTot in the ESA. Default is nNmaxESA=nNmax, i.e.
the ESA is not used
- sCoeffSum: optional string
if sCoeffSum='coeffSum' then the coefficients for all sums
are also returned as [L x nNmax] (for MRad) or [L x nNmaxESA]
(for MTot)arrays.
if sCoeffSum='ESAonly' then only MTot is calculated with ALL
terms in the ES approximation (from n=1). Coeffs in the series
are also returned
Returns: structure stMdip with four fields
each a matrix [L x 1] and four optional coeffs fields as [L x
nNmax] matrices
- stMdip.MRadPerp: [L x 1] wavelength-dependent radiative decay rate EF
for perpendicular dipole
- stMdip.MTotPerp: [L x 1] wavelength-dependent total decay rate EF
for perpendicular dipole
- stMdip.MRadPara: [L x 1] wavelength-dependent radiative decay rate EF
for parallel dipole
- stMdip.MTotPara: [L x 1] wavelength-dependent total decay rate EF
for parallel dipole
- stMdip.MRadPerpCoeffs [L x nNmax]: coeffs of the sums over n
- stMdip.MRadParaCoeffs [L x nNmax]: coeffs of the sums over n
- stMdip.MTotPerpCoeffs [L x nNmaxESA]: coeffs of the sums over n
- stMdip.MTotParaCoeffs [L x nNmaxESA]: coeffs of the sums over n
This file is part of the SPlaC v1.0 package (copyright 2008)
Check the README file for further information

0001 if (nargin<6), sCoeffSum='No'; end; 0002 0003 nNbLambda=length(xp); 0004 0005 if strcmpi(sCoeffSum,'ESAonly') 0006 sCoeffSum='coeffSum'; 0007 nNmax=0; 0008 stMdip.MTotPerp=[]; 0009 stMdip.MTotPara=[]; 0010 stMdip.MTotPerpCoeffs=[]; 0011 stMdip.MTotParaCoeffs=[]; 0012 % goto to ESA computations of MTot only (at the end) 0013 else 0014 % normal procedure starts here 0015 nNmax=size(stGD.Gamma,2); 0016 0017 if (nargin<5), nNmaxESA=nNmax; end; 0018 0019 % get psi_n(xp), xi_n(xp) and derivatives 0020 stRBxp=GenRBall(nNmax,xp); 0021 0022 n=transpose(1:nNmax); % [nNmax x 1] 0023 cc1 = (2.*n+1); % [nNmax x 1] 0024 cc2 = cc1 .*(n+1).*n; % [nNmax x 1] 0025 0026 xp2inv=1./(xp.^2); 0027 0028 % caculate M_{Rad} 0029 % From Eq. H.95 0030 tmp1=GenCheckSum2Mat(stRBxp.psi, stGD.Delta.*stRBxp.xi,'tmp1_1','DipMcoeff'); 0031 tmpMat= abs(tmp1).^2; % [L x nNmax] 0032 stMdip.MRadPerp = 3/2* xp2inv.^2 .* (tmpMat * cc2); % [L x 1] 0033 % no checksum required since this is a sum of positive numbers 0034 0035 if strcmpi(sCoeffSum,'coeffsum') 0036 xp2invmat=repmat(xp2inv,1,nNmax); 0037 stMdip.MRadPerpCoeffs=3/2*xp2invmat.^2 .* (tmpMat .* repmat(transpose(cc2),nNbLambda,1)); 0038 end 0039 0040 % From Eq. H.96 0041 tmp1=GenCheckSum2Mat(stRBxp.psi, stGD.Gamma.*stRBxp.xi,'tmp1_2','DipMcoeff'); 0042 tmp2=GenCheckSum2Mat(stRBxp.Dpsi, stGD.Delta.*stRBxp.Dxi,'tmp2_2','DipMcoeff'); 0043 tmpMat= abs(tmp1).^2 + abs(tmp2).^2; % [L x nNmax] 0044 stMdip.MRadPara = 3/4*xp2inv .* (tmpMat * cc1); % [L x 1] 0045 0046 if strcmpi(sCoeffSum,'coeffsum') 0047 stMdip.MRadParaCoeffs=3/4*xp2invmat .* (tmpMat .* repmat(transpose(cc1),nNbLambda,1)); 0048 end 0049 0050 % calculate M_{Tot} 0051 % Note that this may produce loss-of-precision warnings 0052 % for non-absorbing spheres. In this case, M_{Tot} 0053 % should simply be derived from M_{Rad} (since M_{NR}=0). 0054 xi2=stRBxp.xi.^2; 0055 Dxi2=stRBxp.Dxi.^2; 0056 0057 % Get MTot from Eq. H.102 0058 tmpMat=GenCheckSumReal(stGD.Delta .* xi2,'tmpMat_2','DipMcoeff'); % [L x nNmax] 0059 stMdip.MTotPerp = 1+3/2*xp2inv.^2 .* GenCheckSumMatVec(tmpMat,cc2,'MTotPerp','DipMcoeff'); % [L x 1] 0060 0061 if strcmpi(sCoeffSum,'coeffsum') 0062 stMdip.MTotPerpCoeffs=3/2*xp2invmat.^2 .* (tmpMat .* repmat(transpose(cc2),nNbLambda,1)); 0063 end 0064 0065 % from Eq. H.103 0066 tmp1=GenCheckSumReal(stGD.Delta .* Dxi2,'tmp1_3','DipMcoeff'); 0067 tmp2=GenCheckSumReal(stGD.Gamma .* xi2,'tmp2_3','DipMcoeff'); 0068 tmpMat= GenCheckSum2Mat(tmp1,tmp2,'tmpMat_3','DipMcoeff'); % [L x nNmax] 0069 stMdip.MTotPara = 1+3/4*xp2inv .* GenCheckSumMatVec(tmpMat,cc1,'MTotPara','DipMcoeff'); % [L x 1] 0070 0071 if strcmpi(sCoeffSum,'coeffsum') 0072 stMdip.MTotParaCoeffs=3/4*xp2invmat .* (tmpMat .* repmat(transpose(cc1),nNbLambda,1)); 0073 end 0074 clear tmp1 tmp2 tmpMat xi2 Dxi2; 0075 end 0076 0077 % Apply corrections to MTot using the ESA approx for larger n 0078 if nNmaxESA>nNmax 0079 nES=(nNmax+1):nNmaxESA; % [1 x N2] 0080 nNbNES=length(nES); 0081 ccES = (nES+1).*(a/(a+d)).^(2*nES+1); 0082 s2mat=repmat(s.^2,1,nNbNES); % [L x N2] 0083 imAlphaES=imag( (s2mat-1)./(s2mat+1+repmat(1./nES,nNbLambda,1))); % [L x N2] 0084 xp3inv=1./(xp.^3); 0085 MTotPerpES=3/2*xp3inv.* (imAlphaES * transpose(ccES.*(nES+1))); 0086 MTotParaES=3/4*xp3inv.* (imAlphaES * transpose(ccES.*(nES))); 0087 stMdip.MTotPerp =stMdip.MTotPerp + MTotPerpES; 0088 stMdip.MTotPara =stMdip.MTotPara + MTotParaES; 0089 if strcmpi(sCoeffSum,'coeffsum') 0090 xp3invmat=repmat(xp3inv,1,nNbNES); 0091 stMdip.MTotPerpCoeffs = [stMdip.MTotPerpCoeffs, 3/2*xp3invmat .* imAlphaES .* repmat(ccES.*(nES+1),nNbLambda,1)]; 0092 stMdip.MTotParaCoeffs = [stMdip.MTotParaCoeffs, 3/4*xp3invmat .* imAlphaES .* repmat(ccES.*(nES),nNbLambda,1)]; 0093 end 0094 end 0095